<div class="panes_vertical">
	<div class="box">	
		<form method="post" action="<{$APPLICATION_URL}>/Admin/District/edit" name="frmForm" enctype="multipart/form-data">
			<fieldset>
				<legend>Edit district</legend>															
				<p>
				<select name="City_id">
					<option value="-1">Chọn thành phố</option>
					<{foreach from=$cityList item=item}>
						<option <{if $item->id==$City_id}>selected<{/if}> value="<{$item->id}>"><{$item->city_name}></option>
					<{/foreach}>
				</select>
				</p>
				<p>
					<label>Tên:</label>
					<input type='text' id='District_name' name='District_name' value='<{$District_name}>' class="textfield" style="width: 50%;" max-length="255">					
				</p>
				
				<p>
					<input type="hidden" value="<{$id}>" name="id">
					<input type="submit" name="submit" class="button" id="save" value=" Cập nhật " onclick="formSubmit();" />
					<input type="reset" name="reset" class="button" id="reset" value=" Reset " />
				</p>
			</fieldset>
		</form>
	</div>
</div>

<script type="text/javascript">
    function formSubmit()
    {
    	var theform = document.frmForm;
    	
    	// Check Name
    	var name = theform.name.value;
    	if (name == ''){
			alert('Name is invalid');
			theform.name.focus();
			return false;
    	} 	

    	// Check status
    	var status = theform.status.value;
    	if (status == ''){
			alert('Status is invalid');
			theform.status.focus();
			return false;
    	}

    	theform.actionForm.value = 'submit';
    	theform.submit();
    	return true;
    }
    </script>